package org.codefinger.dao;

import java.util.Map;

import org.codefinger.dao.impl.Querier;
import org.codefinger.dao.impl.QueryParam;

public class Query extends AbstractQuery {

	protected static final QueryParam	NULL_PARAM	= new QueryParam();

	public Query(Querier querier) {
		super(NULL_PARAM, querier);
	}

	public QueryChain putParam(String name, Object value) {
		return new QueryChain(querier).putParam(name, value);
	}

	public QueryChain putParams(Map<String, Object> params) {
		return new QueryChain(querier).putParams(params);
	}

	public QueryChain setParams(Object... params) {
		return new QueryChain(querier).setParams(params);
	}

	public QueryChain setOrders(int... orders) {
		return new QueryChain(querier).setOrders(orders);
	}

	public QueryChain setPage(int pageIndex, int pageSize) {
		return new QueryChain(querier).setPage(pageIndex, pageSize);
	}

}
